<!DOCTYPE html>
<html lang="en">
<head>
    <title>无线路由管理平台</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <link rel="stylesheet" href="css/bootstrap-responsive.min.css" />

    <link rel="stylesheet" href="css/unicorn.main.css" />
    <link rel="stylesheet" href="css/unicorn.grey.css" class="skin-color" />
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/jquery.qtip.min.css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>

<%include inc.html%>



<div id="content">
    <div id="breadcrumb">
        <a href="index.html" title="返回控制台" class="tip-bottom"><i class="icon-home"></i> 无线路由管理平台</a>
        <a href="#" class="current" >WiFi热点管理</a>
    </div>

    <div class="container-fluid">
        <div class="row-fluid">
            <div class="alert alert-info">
                <i class=" icon-cog"></i>

                <%if(retdata.roleinfo.flag==1 || retdata.roleinfo.flag==0){%>
                <%if(typeof(wifiinfo)=="undefined" || wifiinfo==null){%>
                <STRONG class="red"> 您还可以添加<%=retdata.roleinfo.wifinumber%>个热点。</STRONG>
                <%}else{%>
                <STRONG class="red"> 您还可以添加<%=retdata.roleinfo.wifinumber-wifiinfo.length%>个热点。</STRONG>
                <%}%>
                <%}else{%>
                在添加AP设备前需先添加WiFI热点。每个商户可以根据需要配置一个或多个热点。
                <%}%>

                <a href="#" data-dismiss="alert" class="close">×</a>
            </div>
        </div>
        <div class="row-fluid">
            <div id="statusinfo" style="margin: 0 auto;" class="alert alert-block alert-<%if(typeof(retdata.success)!="undefined" && retdata.success==false){%>error<%}else{%>info<%}%>" id="info">
            <i class=" icon-cog"></i>
            <strong >
                <%=retdata.info %>
            </strong>
        </div>

    </div>

    <div class="row-fluid">
        <BR>


        <%if(retdata.roleinfo.flag==1 || retdata.roleinfo.flag==0){%>
            <%if(typeof(wifiinfo)=="undefined" || wifiinfo==null){%>
                <a class="btn btn-primary" href="wifiinfo.html?oper=add"><i class="fa fa-plus-circle fa-lg"></i> 添加WiFi热点信息</a>
            <%}else if(retdata.roleinfo.wifinumber-wifiinfo.length > 0){%>
                <a class="btn btn-primary" href="wifiinfo.html?oper=add"><i class="fa fa-plus-circle fa-lg"></i> 添加WiFi热点信息</a>
            <%}%>
        <%}else{%>
        <a class="btn btn-primary" href="wifiinfo.html?oper=add"><i class="fa fa-plus-circle fa-lg"></i> 添加WiFi热点信息</a>
        <%}%>


        <div class="widget-box">
        <div class="widget-title">
            <h5>WiFi热点信息（代理商可以查询所有下属商户的热点信息）</h5>
        </div>

        <div class="widget-content nopadding">
            <table class="table table-bordered data-table">
            <thead>
                <tr>
                    <th>序号</th>
                    <th>账户</th>
                    <th>热点名称</th>
                    <th>认证类型</th>
                    <th>在线时长</th>
                    <th>在线带宽</th>
                    <th>放通域名</th>
                    <th>认证成功后跳转地址</th>
                    <th>微信回复消息</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <form   method="post"  />
                <%if(typeof(wifiinfo)!=="undefined"&&wifiinfo!==null) { wifiinfo.forEach(function(post, index){%>
                    <tr class="gradeZ" id="tr_<%=post.id%>" >
                        <td style="text-align: center"><%=index+1%></td>

                        <td><%=post.username%><br><span class="blue">  <%=post.nickname%></span>
                            <%if(post.username!==retdata.userinfo.username){%><br>
                                <span class="red"> 隶属于下属商户/代理商<br>谨慎修改。</span>
                            <%}%>
                        </td>
                        <td style="text-align: center"><%=post.wifissid%></td>
                        <td style="text-align: center"><%=post.wifiauthtype%></td>
                        <td style="text-align: center"><%=post.wifiauthhour%> 分钟</td>
                        <td style="text-align: center"><%=post.wifiauthbrand%> K</td>
                        <td style="text-align: center"><%=post.wifipassdomain%></td>
                        <td style="text-align: left"><%=post.wifiredirecturl%></td>
                        <td style="text-align: left"><%=post.weixincode%></td>

                        <td style="text-align: center">
                            <a class="btn btn-danger" href="wifiinfo.html?oper=edit&id=<%=post.id%>">
                                <i class="fa fa-pencil-square-o fa-lg"></i> </a>
                            <a class="btn btn-danger" href="javascript:;" id="deloper"  onclick="deleteoper('<%=post.id%>')">
                                <i class="fa fa-trash-o fa-lg"></i> </a>
                         </td>
                    </tr>


                <%})%>
                <%}%>
            </form>
            </tbody>
        </table>
        </div>
    </div>

    </div>
    <BR>
    <div class="row-fluid">
        <div id="footer" class="span12">
            2014 &copy; 无线广告路由云管理平台
        </div>
    </div>





</div>


<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>

<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<script src="js/unicorn.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script type='text/javascript' src='js/bootbox.min.js' charset='utf-8'></script>

<script src="js/unicorn.wifiadmin.js"></script>

</body>
</html>
